/* ==========================================================
   PUBLICITÉ ALIMENTATION TRANSBEC
   Fichier : style.css
   ========================================================== */


/* ==========================================================
   RÉINITIALISATION
   ========================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;
}

body {
    overflow: hidden;

    color: #222222;
    background-color: transparent;

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}


/* ==========================================================
   CADRE PRINCIPAL
   ========================================================== */

.pub-alimentation {
    width: 100%;
    height: 100%;
    min-height: 220px;

    display: grid;

    /*
     * Colonne gauche : 1/3
     * Colonne droite : 2/3
     */
    grid-template-columns:
        minmax(190px, 1fr)
        minmax(0, 2fr);

    grid-template-rows: minmax(0, 1fr);

    overflow: hidden;

    background-color: #ffffff;

    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 20px;

    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}


/* ==========================================================
   COLONNE GAUCHE — INFORMATIONS DE L’ÉPICERIE
   ========================================================== */

.pub-alimentation__business {
    min-width: 0;
    min-height: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: clamp(14px, 2.4vw, 28px);

    color: #ffffff;
    background:
        radial-gradient(
            circle at top left,
            rgba(255, 193, 7, 0.18),
            transparent 40%
        ),
        linear-gradient(
            145deg,
            #080808 0%,
            #202020 100%
        );

    border-right: 3px solid #d7a800;
}


/* ==========================================================
   LOGO / ICÔNE
   ========================================================== */

.pub-alimentation__business-logo {
    flex: 0 0 auto;

    width: 54px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 13px;

    color: #151515;
    background-color: #ffc107;

    border-radius: 17px;

    font-size: 26px;

    box-shadow: 0 8px 18px rgba(255, 193, 7, 0.22);
}


/* ==========================================================
   TITRE DE L’ÉPICERIE
   ========================================================== */

.pub-alimentation__business-heading {
    min-width: 0;
}

.pub-alimentation__business-label {
    display: inline-block;

    margin-bottom: 6px;

    color: #ffc107;

    font-size: clamp(8px, 1.3vw, 11px);
    font-weight: 900;
    line-height: 1.2;

    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.pub-alimentation__business-heading h1 {
    margin: 0;

    overflow-wrap: anywhere;

    color: #ffffff;

    font-size: clamp(20px, 3vw, 35px);
    font-weight: 900;
    line-height: 1.05;
}

.pub-alimentation__business-heading p {
    margin: 9px 0 0;

    color: rgba(255, 255, 255, 0.7);

    font-size: clamp(10px, 1.4vw, 13px);
    line-height: 1.4;
}


/* ==========================================================
   LISTE DES COORDONNÉES
   ========================================================== */

.pub-alimentation__contact-list {
    display: flex;
    flex-direction: column;

    gap: 8px;

    margin-top: 16px;
}

.pub-alimentation__contact {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 9px;

    padding: 8px 9px;

    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.07);

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;

    text-decoration: none;
}

a.pub-alimentation__contact {
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

a.pub-alimentation__contact:hover {
    color: #ffffff;
    background-color: rgba(255, 193, 7, 0.15);

    transform: translateX(3px);
}

.pub-alimentation__contact-icon {
    flex: 0 0 auto;

    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #151515;
    background-color: #ffc107;

    border-radius: 10px;

    font-size: 15px;
}

.pub-alimentation__contact > span:last-child {
    min-width: 0;
}

.pub-alimentation__contact small,
.pub-alimentation__contact strong {
    display: block;
}

.pub-alimentation__contact small {
    margin-bottom: 2px;

    color: rgba(255, 255, 255, 0.55);

    font-size: 8px;
    font-weight: 800;
    line-height: 1.2;

    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.pub-alimentation__contact strong {
    overflow-wrap: anywhere;

    color: #ffffff;

    font-size: clamp(10px, 1.3vw, 13px);
    font-weight: 800;
    line-height: 1.25;
}


/* ==========================================================
   BOUTON VERS LE SITE DE L’ÉPICERIE
   ========================================================== */

.pub-alimentation__website {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    width: 100%;
    margin-top: 14px;
    padding: 9px 13px;

    color: #161616;
    background-color: #ffc107;

    border: 0;
    border-radius: 999px;

    font-size: 12px;
    font-weight: 900;
    line-height: 1;

    text-align: center;
    text-decoration: none;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.pub-alimentation__website:hover {
    color: #161616;
    background-color: #ffd34c;

    transform: translateY(-2px);

    box-shadow: 0 8px 16px rgba(255, 193, 7, 0.25);
}

.pub-alimentation__website:active {
    transform: scale(0.97);
}


/* ==========================================================
   COLONNE DROITE — DIAPORAMA
   ========================================================== */

.pub-alimentation__slideshow {
    position: relative;

    min-width: 0;
    min-height: 0;

    width: 100%;
    height: 100%;

    overflow: hidden;

    background-color: #f5f5f5;
}


/* ==========================================================
   CONTENEUR DE L’IMAGE
   ========================================================== */

.pub-alimentation__viewport {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.pub-alimentation__image {
    width: 85%;
    height: 85%;

    display: block;

    object-fit: contain;
    object-position: center;

    transition: opacity 0.35s ease;
}

.pub-alimentation--visible .pub-alimentation__image {
    opacity: 1;
    transform: scale(1);
}


/* ==========================================================
   NAVIGATION DU DIAPORAMA
   ========================================================== */

.pub-alimentation__navigation {
    position: absolute;
    top: 50%;

    z-index: 4;

    width: 39px;
    height: 39px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.65);

    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;

    font-size: 18px;
    line-height: 1;

    cursor: pointer;

    transform: translateY(-50%);

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.pub-alimentation__navigation:hover {
    color: #161616;
    background-color: #ffc107;

    transform: translateY(-50%) scale(1.08);
}

.pub-alimentation__navigation:active {
    transform: translateY(-50%) scale(0.94);
}

.pub-alimentation__navigation--previous {
    left: 11px;
}

.pub-alimentation__navigation--next {
    right: 11px;
}


/* ==========================================================
   INDICATEURS DU DIAPORAMA
   ========================================================== */

.pub-alimentation__indicators {
    position: absolute;
    right: 0;
    bottom: 10px;
    left: 0;

    z-index: 4;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    padding: 0 50px;
}

.pub-alimentation__indicator {
    width: 20px;
    height: 5px;

    flex: 0 0 auto;

    padding: 0;

    background-color: rgba(0, 0, 0, 0.34);

    border: 0;
    border-radius: 999px;

    cursor: pointer;

    transition:
        width 0.25s ease,
        background-color 0.25s ease;
}

.pub-alimentation__indicator:hover {
    background-color: rgba(255, 193, 7, 0.75);
}

.pub-alimentation__indicator--active {
    width: 38px;

    background-color: #ffc107;
}


/* ==========================================================
   ÉCRANS DE MOINS DE 900 PX
   Les colonnes restent horizontales.
   ========================================================== */

@media screen and (max-width: 900px) {
    .pub-alimentation {
        grid-template-columns:
            minmax(165px, 1fr)
            minmax(0, 2fr);
    }

    .pub-alimentation__business {
        padding: 13px;
    }

    .pub-alimentation__business-logo {
        width: 44px;
        height: 44px;

        margin-bottom: 9px;

        border-radius: 13px;

        font-size: 20px;
    }

    .pub-alimentation__business-heading h1 {
        font-size: clamp(18px, 3vw, 26px);
    }

    .pub-alimentation__business-heading p {
        margin-top: 6px;

        font-size: 10px;
    }

    .pub-alimentation__contact-list {
        gap: 6px;

        margin-top: 10px;
    }

    .pub-alimentation__contact {
        gap: 6px;

        padding: 6px;
    }

    .pub-alimentation__contact-icon {
        width: 29px;
        height: 29px;

        border-radius: 8px;

        font-size: 12px;
    }

    .pub-alimentation__website {
        min-height: 36px;

        margin-top: 9px;
        padding: 7px;

        font-size: 10px;
    }
}


/* ==========================================================
   MOBILES
   Toujours deux colonnes horizontales.
   ========================================================== */

@media screen and (max-width: 575px) {
    .pub-alimentation {
        min-height: 190px;

        grid-template-columns:
            minmax(108px, 1fr)
            minmax(0, 2fr);

        grid-template-rows: minmax(0, 1fr);

        border-radius: 14px;
    }

    .pub-alimentation__business {
        justify-content: center;

        padding: 8px 6px;

        border-right-width: 2px;
    }

    .pub-alimentation__business-logo {
        width: 32px;
        height: 32px;

        margin-bottom: 5px;

        border-radius: 9px;

        font-size: 14px;
    }

    .pub-alimentation__business-label {
        margin-bottom: 2px;

        font-size: 6px;
        letter-spacing: 0.2px;
    }

    .pub-alimentation__business-heading h1 {
        font-size: 14px;
        line-height: 1.05;
    }

    .pub-alimentation__business-heading p {
        display: none;
    }

    .pub-alimentation__contact-list {
        gap: 4px;

        margin-top: 6px;
    }

    .pub-alimentation__contact {
        gap: 4px;

        min-height: 27px;

        padding: 3px;

        border-radius: 7px;
    }

    .pub-alimentation__contact-icon {
        width: 21px;
        height: 21px;

        border-radius: 6px;

        font-size: 8px;
    }

    .pub-alimentation__contact small {
        display: none;
    }

    .pub-alimentation__contact strong {
        font-size: 7px;
        line-height: 1.1;
    }

    .pub-alimentation__website {
        min-height: 27px;

        gap: 3px;

        margin-top: 5px;
        padding: 4px;

        font-size: 8px;
    }

    .pub-alimentation__navigation {
        width: 27px;
        height: 27px;

        font-size: 11px;
    }

    .pub-alimentation__navigation--previous {
        left: 5px;
    }

    .pub-alimentation__navigation--next {
        right: 5px;
    }

    .pub-alimentation__indicators {
        bottom: 5px;

        gap: 3px;

        padding: 0 35px;
    }

    .pub-alimentation__indicator {
        width: 11px;
        height: 3px;
    }

    .pub-alimentation__indicator--active {
        width: 21px;
    }
}


/* ==========================================================
   TRÈS PETITS MOBILES
   ========================================================== */

@media screen and (max-width: 360px) {
    .pub-alimentation {
        min-height: 175px;

        grid-template-columns:
            minmax(96px, 1fr)
            minmax(0, 2fr);
    }

    .pub-alimentation__business {
        padding: 6px 4px;
    }

    .pub-alimentation__business-logo {
        width: 28px;
        height: 28px;

        margin-bottom: 3px;

        font-size: 12px;
    }

    .pub-alimentation__business-heading h1 {
        font-size: 12px;
    }

    .pub-alimentation__contact {
        min-height: 24px;
    }

    .pub-alimentation__contact-icon {
        width: 18px;
        height: 18px;

        font-size: 7px;
    }

    .pub-alimentation__contact strong {
        font-size: 6.5px;
    }

    .pub-alimentation__website {
        min-height: 24px;

        font-size: 7px;
    }
}


/* ==========================================================
   ACCESSIBILITÉ — RÉDUCTION DES ANIMATIONS
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
    .pub-alimentation__image,
    .pub-alimentation__navigation,
    .pub-alimentation__indicator,
    .pub-alimentation__website,
    .pub-alimentation__contact {
        transition: none;
    }
}