/* =====================================
   ITOKIANA AUTO - DIAPORAMA D'ACCUEIL
   ===================================== */

/* Conteneur du diaporama */
.hero-slideshow {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    background-color: var(--color-primary-dark);
}

/* Photos automobiles */
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

/* Photo actuellement visible */
.hero-slide.active {
    opacity: 1;
}

/* Filtre sombre */
.hero-slideshow::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(25, 15, 18, 0.25);
    z-index: 2;
}

/* =====================================
   ACCUEIL FIXE ET CONTENU DÉFILANT
   ===================================== */

/* Section d'accueil */
#header {
    position: relative;
    isolation: isolate;
    height: 100vh;
    background: transparent;
    z-index: auto;
}

/* Garder le titre de l'accueil fixe */
#header > header.major {
    position: fixed;
    top: 40%;
    left: 0;
    width: 100%;
    height: auto;
    transform: translateY(-50%);
    margin: 0;
    padding: 0 20px;
    opacity: 1 !important;
    z-index: 0;
    pointer-events: none;
}

/* Titre principal */
#header header h1 {
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Sous-titre */
#header header p {
    color: #ffffff;
    letter-spacing: 0.15em;
}

/* Panneau Découvrir */
#header > .container {
    position: absolute;
    bottom: 0;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    margin: 0;
    z-index: 2;
}

/* Les sections passent devant l'accueil */
.main,
#footer {
    position: relative;
    z-index: 2;
    background: transparent;
}

/* Fond opaque des panneaux */
#header > .container,
.main > .container,
#footer > .container {
    background-color: var(--color-background, #EAE5DF);
}

/* Désactiver les anciens arrière-plans */
.main-bg {
    display: none !important;
}

.main .image.primary {
    display: none !important;
}

/* Bouton Pause toujours accessible */
#slideshow-toggle {
    position: fixed;
    top: 1em;
    right: 1em;
    background: var(--color-primary-dark);
    color: #ffffff !important;
    padding: 0 1em;
    z-index: 100;
}

/* =====================================
   SECTION CONTACT
   ===================================== */

/* Conteneur des coordonnées */
.contact-info {
    margin: 2em 0;
    text-align: center;
}

/* Madagascar et Canada côte à côte */
.contact-locations {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5em;
}

/* Coordonnées de chaque pays */
.contact-location {
    padding: 1em 0;
}

/* Séparation entre les deux pays */
.contact-location:first-child {
    border-right: 1px solid var(--color-secondary);
}

/* Nom du pays */
.contact-location h3 {
    color: var(--color-primary);
    margin-bottom: 1.5em;
}

/* Adresse et téléphone */
.contact-location p {
    margin-bottom: 1.5em;
    font-size: 0.95em;
}

/* Icônes de contact */
.contact-info .icon {
    color: var(--color-primary);
    margin-bottom: 0.5em;
}

/* Liens téléphone et email */
.contact-info a:not(.button) {
    color: var(--color-text);
    text-decoration: none;
    border-bottom: none;
    overflow-wrap: anywhere;
}

.contact-info a:not(.button):hover {
    color: var(--color-primary);
}

/* Adresse email commune */
.contact-email {
    border-top: 1px solid var(--color-secondary);
    margin-top: 1em;
    padding-top: 2em;
}

.contact-email p {
    margin-bottom: 1.5em;
}

/* =====================================
   RESPONSIVE - TÉLÉPHONES
   ===================================== */

@media screen and (max-width: 736px) {

    /* Bouton Pause */
    #slideshow-toggle {
        top: 0.75em;
        right: 0.75em;
        font-size: 0.7em;
    }

    /* Coordonnées sur une seule colonne */
    .contact-locations {
        grid-template-columns: 1fr;
        gap: 1em;
    }

    /* Séparation horizontale entre les pays */
    .contact-location:first-child {
        border-right: none;
        border-bottom: 1px solid var(--color-secondary);
    }

    /* Bouton email */
    .contact-email .button {
        width: 100%;
        font-size: 0.85em;
        padding-left: 0.5em;
        padding-right: 0.5em;
    }
}

/* =====================================
   ACCESSIBILITÉ
   ===================================== */

@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        transition: none;
    }
}