/* ============================================================
   CARTE DES DESSINS — CSS PUBLIC V1
   Couleurs : #32125c (violet foncé) / #ccb7cc (lilas clair)
   ============================================================ */

:root {
    --violet:    #32125c;
    --lilas:     #ccb7cc;
    --lilas-clair: #f0eaf0;
    --texte:     #000000;
    --gris:      #6b7280;
    --blanc:     #ffffff;
    --rayon:     12px;

    /* Couleurs du site principal */
    --principal:  #bf66ff;   /* violet principal */
    --secondaire: #ffff00;   /* jaune secondaire */
}

/* ---------------------------------------- Police Montserrat
   Auto-hébergée (RGPD) : aucun appel à Google Fonts.
   Fichier : /assets/fonts/montserrat-variable.woff (licence OFL)
   Police variable : graisses 100 à 900 dans un seul fichier.
   ---------------------------------------------------------- */

@font-face {
    font-family: 'Montserrat';
    src: url('/assets/fonts/montserrat-variable.woff') format('woff');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ---------------------------------------- Reset */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif;
    background: var(--lilas-clair);
    color: var(--texte);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Les champs de formulaire et boutons n'héritent pas la police par défaut */
button, input, textarea, select {
    font-family: inherit;
}

/* Fond de carte MapLibre (contrôles, attribution) */
.maplibregl-map {
    font-family: inherit;
}

/* ---------------------------------------- Curseur clignotant désactivé
   Aucun curseur de texte sur l'interface publique, sauf dans les
   champs de saisie (formulaire de témoignage, recherche) où il
   reste indispensable.
   ---------------------------------------------------------- */

body {
    caret-color: transparent;
    -webkit-user-select: none;
    user-select: none;
}

input, textarea {
    caret-color: auto;
    -webkit-user-select: text;
    user-select: text;
}

/* Pas de contour au clic souris, conservé pour la navigation clavier */
:focus:not(:focus-visible) {
    outline: none;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* ---------------------------------------- Header */

.site-header {
    /* dégradé : blanc (haut gauche) vers violet principal (bas droite) */
    background: linear-gradient(100deg, #ffffff 0%, var(--principal) 100%);
    min-height: 68px;
    padding: 0 24px;
    display: flex;
    align-items: center;
}

.site-logo {
    color: #000;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.preview-trouve {
    display: none;
    background: #16a34a;
    color: #fff;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 20px;
    margin-left: 6px;
}

/* ---------------------------------------- Fiche */

.fiche {
    max-width: 680px;
    width: 100%;
    margin: 24px auto 0;
    padding: 0 20px 32px;
    flex: 1;
}

/* Badge série */

.serie-badge {
    display: inline-block;
    color: var(--blanc);
    font-size: 0.78rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

/* Titre */

.fiche-titre {
    font-size: 2rem;
    font-weight: 800;
    color: #000;
    line-height: 1.2;
    margin-bottom: 8px;
}

/* Lieu */

.fiche-lieu {
    color: #000;
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Date */

.fiche-date {
    color: #000;
    font-size: 1rem;
    margin-top: 14px;
    margin-bottom: 8px;
}

/* Message d'information (confidentialité, notes) : seul usage du gris */
.note-info {
    color: var(--gris);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-top: 16px;
}

/* Texte d'introduction de la page témoignage */
.intro-temoignage {
    color: #000;
    font-size: 1.2rem;
    line-height: 1.5;
    margin: 8px 0 20px;
}

/* Page centrée (désinscription mesure d'audience) */
.fiche-centree {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.fiche-centree .lien-retour { margin: 0 auto; }

/* Description */

.fiche-description {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--texte);
    margin-top: 16px;
    margin-bottom: 8px;
    white-space: pre-line;
}

/* ---------------------------------------- Carrousel */

.carrousel {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--violet);
    border-radius: var(--rayon);
    overflow: hidden;
    margin-top: 24px;
}

.carrousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carrousel-slide.active {
    opacity: 1;
}

.carrousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Flèches */

.carrousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(50, 18, 92, 0.6);
    color: var(--blanc);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.carrousel-btn:hover {
    background: rgba(50, 18, 92, 0.9);
}

.carrousel-btn.prev { left: 12px; }
.carrousel-btn.next { right: 12px; }

/* ---------------------------------------- Miniatures */

.miniatures {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.miniature {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 3px solid transparent;
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s;
}

.miniature.active,
.miniature:hover {
    opacity: 1;
    border-color: var(--violet);
}

/* ---------------------------------------- CTA témoignage */

.cta-temoignage {
    margin: 24px 0;
    text-align: center;
}

/* ---------------------------------------- Témoignages */

.temoignages { margin-top: 32px; }

.temoignages-titre {
    font-size: 1.3rem;
    font-weight: 800;
    color: #000;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--lilas);
}

.temoignage-card {
    background: var(--blanc);
    border-radius: var(--rayon);
    padding: 20px;
    margin-bottom: 16px;
    border-left: 4px solid var(--lilas);
}

.temoignage-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.temoignage-auteur {
    font-weight: bold;
    color: #000;
    font-size: 1rem;
}

.temoignage-pays {
    background: var(--lilas-clair);
    color: #000;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: bold;
    letter-spacing: 0.05em;
}

.temoignage-date {
    color: #000;
    font-size: 0.9rem;
    margin-left: auto;
}

.temoignage-message {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--texte);
}

/* ---------------------------------------- Formulaire témoignage */

.form-temoignage {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-groupe {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-groupe label {
    font-size: 0.9rem;
    font-weight: bold;
    color: #000;
}

.form-groupe input[type="text"],
.form-groupe textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--lilas);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--texte);
    background: var(--blanc);
    transition: border-color 0.2s;
    resize: vertical;
}

.form-groupe input:focus,
.form-groupe textarea:focus {
    outline: none;
    border-color: var(--violet);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal !important;
    color: var(--texte) !important;
}

.optionnel {
    color: var(--gris);
    font-weight: normal;
    font-size: 0.85rem;
}

/* Messages */

.message-succes {
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: var(--rayon);
    padding: 16px 20px;
    color: #166534;
    margin-bottom: 24px;
}

.message-erreur {
    background: #fef2f2;
    border: 2px solid #fca5a5;
    border-radius: var(--rayon);
    padding: 16px 20px;
    color: #b91c1c;
    margin-bottom: 24px;
}

/* ---------------------------------------- Footer */

.site-footer {
    /* même dégradé que le header */
    background: linear-gradient(100deg, #ffffff 0%, var(--principal) 100%);
    color: #000;
    text-align: center;
    padding: 24px 16px;
    font-size: 0.85rem;
    font-weight: 500;
}

.site-footer a {
    color: #000;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------------------------------------- Responsive */

@media (max-width: 480px) {

    .fiche-titre { font-size: 1.5rem; }

    .carrousel-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .miniature {
        width: 52px;
        height: 52px;
    }

}

/* ============================================================
   BOUTON BASCULE FR / EN
   ============================================================ */

.site-header {
    /* logo centré, bouton de langue à droite */
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.site-logo { grid-column: 2; display: flex; align-items: center; }
.lang-switch { grid-column: 3; justify-self: end; }

.site-logo-img {
    height: 48px;
    width: auto;
    max-width: 60vw;
    object-fit: contain;
}

.lang-switch {
    color: #000;
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 0.08em;
    border: 1px solid rgba(0,0,0,0.5);
    border-radius: 20px;
    padding: 4px 12px;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}

.lang-switch:hover {
    background: rgba(255,255,255,0.5);
    color: #000;
}

/* ============================================================
   LIEN "AUTRES DESSINS DE LA SÉRIE"
   ============================================================ */



/* ============================================================
   BOUTONS PRINCIPAUX
   Jaune + écriture noire. Au survol : violet principal + blanc.
   ============================================================ */

.btn-temoignage,
.preview-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--secondaire);
    color: #000;
    border: none;
    padding: 12px 28px;
    border-radius: 40px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
    transition: background 0.2s, color 0.2s, transform 0.12s, box-shadow 0.12s;
}

.btn-temoignage:hover,
.preview-btn:hover {
    background: var(--principal);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.22);
}

/* Effet d'enfoncement au clic */
.btn-temoignage:active,
.preview-btn:active {
    transform: translateY(2px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-temoignage:focus-visible,
.preview-btn:focus-visible {
    outline: 3px solid var(--principal);
    outline-offset: 3px;
}

.preview-btn {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* ============================================================
   BOUTONS SECONDAIRES
   Violet principal simple sur fond transparent.
   ============================================================ */

.btn-secondaire,
.btn-serie,
.lien-retour,
.filtres-reset,
.preview-fermer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--principal);
    border: 2px solid var(--principal);
    padding: 6px 16px;
    border-radius: 40px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    opacity: 1;
    transition: background 0.2s;
}

.btn-secondaire:hover,
.btn-serie:hover,
.lien-retour:hover,
.filtres-reset:hover,
.preview-fermer:hover {
    background: rgba(191, 102, 255, 0.15);
    color: var(--principal);
    opacity: 1;
}

.btn-secondaire:focus-visible,
.btn-serie:focus-visible,
.lien-retour:focus-visible,
.filtres-reset:focus-visible,
.preview-fermer:focus-visible {
    outline: 3px solid var(--principal);
    outline-offset: 2px;
}

.btn-secondaire { margin-left: 6px; }
.btn-serie      { padding: 10px 22px; font-size: 0.9rem; justify-content: center; }
.lien-retour    { display: flex; width: fit-content; margin-bottom: 16px; }

/* Mobile : bouton série pleine largeur */
@media (max-width: 480px) {
    .btn-serie {
        display: flex;
        width: 100%;
    }
}

/* ============================================================
   FILTRES Tous / À trouver / Trouvé : style bouton principal
   Jaune + noir ; survol et sélection : violet + blanc.
   ============================================================ */

.filtre-btn {
    background: var(--secondaire);
    color: #000;
    font-weight: 700;
}

.filtre-btn:hover,
.filtre-btn.active {
    background: var(--principal);
    color: #fff;
}

/* Illustration de la page 404 (assets/img/404.png) */
.img-404 {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    margin: 0 auto 8px;
}
