/*
    File created by LF Consulting - All rights reserved.
    Project: TapDriver
*/

/*    Définition des constantes.    */
:root {
    /*  Couleur pour l’arriere plan.  */
    --back-ground-color: #111;
    /*  Couleur pour le texte.  */
    --text-color: #fff;
    --muted: #ccc;
    /*  Couleur des titres.  */
    --gold: #FFD700;
    /*  Couleur de l’arrière plan des cartes affichant les prix.  */
    --card: #222;
    --line: #333;
    /*  Couleur de la bordure des images avatar.  */
    --accent: #22d3ee;

    /* Échelles fluides (mobile-first) */
    --space-x: clamp(0.75rem, 3.5vw, 1.25rem);
    --space-y: clamp(0.6rem, 2.8vw, 1rem);

    /* Hauteur FIXE (relative au texte) pour rester stable en portrait/paysage */
    --control-height: 3.4rem;
    --header-height: var(--control-height);
}

/* Header bannière pleine largeur */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Désactive le scroll horizontal (et le pan horizontal sur mobile) */
body {
    touch-action: pan-y;
    overscroll-behavior-x: none;
    overscroll-behavior-y: none;
    position: relative;
    /* nécessaire pour le stacking context */
    font-family: Arial, Helvetica, sans-serif;
    background: transparent;
    color: var(--text-color);
    margin: 0;
    text-align: center;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    /* réserve l'espace de la bannière fixée */
    padding-top: var(--header-height);
    /* décale le dernier contenu du bas de l'écran, sans créer de bande colorée */
    padding-bottom: max(clamp(1.25rem, 4vh, 2.5rem), env(safe-area-inset-bottom));
}

/* Hauteur de bannière (stable pour éviter les sauts au scroll) */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    width: 100%;
    z-index: 1000;
    background: #000;
    /* empêche toute transparence/overlay */
    isolation: isolate;
    /* évite les effets de blend du fond */
}

.header-banner {
    width: 100%;
    height: 100%;
    margin: 0;
}

.banner-header {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: fill;
}

/*    Adaptation du style du header pour les petits écrans (mobiles).    */
@media (max-width: 480px) {
    body {
        /* garde le scroll vertical, sans pan horizontal */
        overscroll-behavior-y: none;
    }

    .titre-header,
    .desc-header {
        flex: 1;
        /* le texte prend l’espace restant */
        margin: 0;
        text-align: left;
        word-wrap: break-word;
    }
}

/* Calques de fond fixes: ne bougent jamais au scroll */
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--ivw, 100vw);
    height: var(--ivh, 100vh);
    pointer-events: none;
    z-index: -1;
    overflow: hidden;

    /* stabilité mobile */
    transform: translateZ(0);
    backface-visibility: hidden;
}

/*
  Portrait mobile:
  On pivote l'image de 90° mais on garde un calque plein écran.
  Le scale évite les "coins vides" après rotation, sans dépendre de vh (instable au scroll).
*/
@media (orientation: portrait) {
    .bg-layer {
        /* centré sur des valeurs lockées => ne bouge pas quand la barre d'adresse change */
        top: calc(var(--ivh, 100vh) * 0.5);
        left: calc(var(--ivw, 100vw) * 0.5);

        /* On garde cover, mais on adapte le rectangle en portrait par rotation 90° */
        width: var(--ivh, 100vh);
        height: var(--ivw, 100vw);

        transform: translate(-50%, -50%) rotate(90deg) translateZ(0);
        transform-origin: center;
    }
}

/* Image unique de fond */
.bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* animation couleurs (scintille) */
    will-change: filter, transform;
    animation: cyan-pulse 2s ease-in-out infinite;
    transform: translateZ(0);
    transform-origin: center;
}

@media (pointer: fine) and (orientation: landscape) {
    .bg-image {
        object-fit: fill;
    }
}

@keyframes cyan-pulse {
    0% {
        filter: saturate(1.05) brightness(0.92) contrast(1.06) hue-rotate(0deg);
    }

    50% {
        filter: saturate(1.65) brightness(1.12) contrast(1.22) hue-rotate(14deg);
    }

    100% {
        filter: saturate(1.05) brightness(0.92) contrast(1.06) hue-rotate(0deg);
    }
}

/* Animation d'ambiance : augmente légèrement la lueur globale */
@keyframes cyan-ambient {
    0% {
        opacity: 0.06;
    }

    50% {
        opacity: 0.18;
    }

    100% {
        opacity: 0.06;
    }
}

.container {
    width: 100%;
    max-width: min(26rem, 92vw);
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Espace sur mobile entre les boutons et les bords */
    padding: 0 var(--space-x) clamp(2rem, 8vh, 4rem);
}

h1 {
    color: var(--gold);
}

.btn {
    display: block;
    width: 100%;
    max-width: min(24rem, 92vw);
    margin: var(--space-y) auto;
    min-height: var(--control-height);
    padding: clamp(0.75rem, 3.5vw, 1rem);
    border-radius: clamp(0.6rem, 2.8vw, 0.85rem);
    border-color: #777;
    text-decoration: none;
    font-weight: 700;
    box-sizing: border-box;
}

/* Les accordéons doivent pouvoir scroller sous le header fixe */
details.box-aff {
    scroll-margin-top: calc(var(--header-height) + var(--space-y));
}


/* Style du bouton pour appeler le chauffeur. */
.btn-customers-call {
    background: #28a745;
    color: var(--text-color);
}

/* Style du bouton pour commander sur whatsapp. */
.btn-customers-wh {
    background: #25D366;
    color: var(--text-color);
}

/* Style du bouton pour laisser un avis google. */
.btn-customers-google {
    background: #4285F4;
    color: var(--text-color);
}

/* Style du bouton pour ajouter le chauffeur au contacts. */
.btn-customers-contact {
    background: #444;
    color: var(--text-color);
}


/*    Style de la division contenant les prix des courses.    */

.box-aff {
    background: var(--card);
    padding: 12px;
    border-radius: 8px;
    text-align: left;
    margin-top: 16px;
}

/* Le titre (summary) */
.box-aff summary {
    cursor: pointer;
    font-weight: bold;
    list-style: none;
    outline: none;
    /* aligne flèche + texte sur une seule ligne */
    display: flex;
    /* centre verticalement */
    align-items: center;
    /* espace entre texte et flèche */
    justify-content: space-between;
}

/* Retire la flèche par défaut du navigateur */
.box-aff summary::-webkit-details-marker {
    display: none;
}

/* Ajoute une icône flèche stylée */
.box-aff summary::after {
    content: " ▼";
    font-size: 0.8rem;
    color: var(--gold);
    margin-left: 8px;
    /* ✅ petit espace avec le texte */
    transition: transform 0.2s ease;
}

/* Quand la section est ouverte → flèche vers le haut */
.box-aff[open] summary::after {
    /* animation fluide au lieu de changer le contenu */
    transform: rotate(180deg);
}

/* Liste interne */
.box-aff ol {
    margin-top: 10px;
    padding-left: 20px;
    color: var(--text-color);
    font-size: 0.9rem;
}

/* Style des titre de niveau 2 des éléments de type box-aff */
.box-aff h2 {
    color: var(--gold);
}

/* Style des listes dans des éléments de type box-aff */
.box-aff ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Style des éléments de liste dans des éléments de type box-aff */
.box-aff li {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}

/*    Style de la division contenant l'image avatar du chauffeur.   */
img.avatar {
    width: clamp(5.5rem, 32vw, 7.5rem);
    height: clamp(5.5rem, 32vw, 7.5rem);
    border-radius: 50%;
    border: max(0.15rem, 0.35vw) solid var(--accent);
    margin: clamp(0.8rem, 3.2vw, 1.2rem) auto;
    display: block;
    object-fit: cover;
}

/*    Style de la division contenant le footer.   */
.footer {
    font-size: 0.8rem;
    color: #777;
    margin-top: var(--space-y);
    margin-bottom: max(clamp(1.5rem, 6vh, 3rem), env(safe-area-inset-bottom));
}

/*
  File created by LF Consulting - All rights reserved.
  Project: TapDriver
*/