@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap');

:root {
    --primary: #182355;
    --secondary: #182355;
    --background: #ffffff;
    --foreground: #1a1a1a;
    --radius: 1rem;
}

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

html {
    font-family: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    background: var(--background);
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--background);
    background-image:
        radial-gradient(circle at 10% 15%, rgba(0, 167, 194, 0.28) 0, transparent 18rem),
        radial-gradient(circle at 30% 30%, rgba(0, 167, 194, 0.14) 0, transparent 10rem),
        radial-gradient(circle at 85% 10%, rgba(242, 94, 51, 0.24) 0, transparent 16rem),
        radial-gradient(circle at 75% 25%, rgba(242, 94, 51, 0.12) 0, transparent 9rem),
        radial-gradient(circle at 20% 78%, rgba(88, 62, 153, 0.22) 0, transparent 14rem),
        radial-gradient(circle at 50% 90%, rgba(88, 62, 153, 0.12) 0, transparent 10rem),
        radial-gradient(circle at 75% 70%, rgba(242, 174, 1, 0.24) 0, transparent 16rem);
    background-repeat: no-repeat;
    background-blend-mode: normal;
    color: var(--foreground);
    min-height: 100vh;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    width: min(100%, 65rem);
    margin: 0 auto;
    padding: 0 1rem;
}

header {
    padding: 1rem 0;
    text-align: center;
    position: relative;
}

.header-inner {
    position: relative;
}

.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.9);
    color: var(--foreground);
    padding: 0.75rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.header-logo {
    display: block;
    max-width: 640px;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.header-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.75rem);
    font-weight: 700;
}

.header-subtitle {
    margin: 0.5rem 0 0;
    color: var(--secondary);
    font-size: clamp(0.9rem, 2vw, 1.75rem);
}

main {
    padding: 2rem 0;
}

.intro-copy {
    max-width: 45rem;
    margin: 0 auto 2rem;
    color: #2c2c2c;
    line-height: 1.75;
    font-size: 1rem;
}

.intro-copy p {
    margin: 0 0 1rem;
}
/* Wrapper for intro button – centers it and adds spacing */
.intro-button-wrapper {
    margin: 1.5rem auto;
    text-align: center;
}
.intro-button {    display: block;    width: 100%;    max-width: 22rem;    margin: 0 auto;    border: none;    padding: 0.75rem 2rem;    border-radius: 999px;    background: var(--primary);    color: white;    font-weight: 700;    cursor: pointer;    transition: transform 0.2s ease, background 0.2s ease;}
.intro-button:hover {
    background: #0f1942;
    transform: translateY(-1px);
}


.grid {
    display: grid;
    gap: 1rem;
    justify-content: center;
    justify-items: center;
    grid-template-columns: repeat(auto-fit, 200px);
}

.card {
    width: 100%;
    max-width: 200px;
    min-width: 0;
    justify-self: center;
    perspective: 1200px;
    position: relative;
    min-height: 550px;
    touch-action: manipulation;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

@media (hover: none) {
    .card:not(.is-flipped):hover .card-inner {
        transform: none;
    }
}

.card:hover .card-inner,
.card.is-flipped .card-inner {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    backface-visibility: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
    min-height: 100%;
}

.card-front {
}

.card-front::after {
    content: '↻';
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.1rem;
    height: 2.1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
    opacity: 0.82;
    transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease;
    pointer-events: none;
}

.card:hover .card-front::after,
.card:focus-within .card-front::after {
    transform: translateY(-2px);
    opacity: 1;
}

@media (hover: none) {
    .card-front::after {
        opacity: 1;
        background: rgba(255, 255, 255, 0.98);
    }

    .card:active .card-front::after {
        transform: scale(0.96);
    }
}

.card-back {
    transform: rotateY(180deg);
    text-align: left;
}

.card-back::after {
    content: '↻';
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.1rem;
    height: 2.1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
    opacity: 0.82;
    transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease;
    pointer-events: none;
}

.card-back:hover::after,
.card-back:focus-within::after {
    transform: translateY(-2px);
    opacity: 1;
}

.card-front-content,
.card-back-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    flex: 1;
}

.card-back-content {
    gap: 0.5rem;
}

.card-footer {
    padding: 0 1rem 1rem;
    width: calc(100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 0.75rem;
}

.card-footer.card-footer-double {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.card-button {
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

/* Round play button */
.card-button-round {
    width: 3rem;
    height: 3rem;
    min-width: 3rem;
    min-height: 3rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.5rem;
    background: var(--primary);
    color: white;
    transition: transform 0.2s ease, background 0.2s ease;
    align-self: center;
}
.card-button.card-button-video {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 999px;
}

.card-button.card-button-video .video-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.card-button-round {
    /* Force a square size; adjust the value to change the diameter */
    width: 3rem;
    height: 3rem;
    min-width: 3rem;      /* prevent flex‑shrink from changing the size */
    min-height: 3rem;
    border-radius: 50%;   /* makes the button perfectly round */
    display: inline-flex; /* centre the icon */
    align-items: center;
    justify-content: center;
    padding: 0;           /* padding is not needed – size is fixed */
    font-size: 1.5rem;    /* size of the play glyph */
    background: var(--primary);
    color: white;
    transition: transform 0.2s ease, background 0.2s ease;
    align-self: center;
}

.card-button-round:hover {
    background: #0f1942;      /* same hover colour as other buttons */
    transform: translateY(-1px);
}

.video-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.video-modal.open {
    display: flex;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.75);
}

.video-modal-content {
    position: relative;
    z-index: 1;
    width: min(95vw, 900px);
    max-height: 90vh;
    background: rgba(8, 11, 20, 0.98);
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    align-items: stretch;
    overflow: auto;
}

.video-modal-content.details-active {
    width: min(90vw, 760px);
    background: #ffffff;
    color: #1a1a1a;
}

.video-modal-content.details-active .video-modal-close {
    background: rgba(0, 0, 0, 0.08);
    color: #1a1a1a;
}

.video-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.4rem;
    height: 2.4rem;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.18);
}

.video-modal-details {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.video-modal-gallery {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.25rem 0;
}

.gallery-item {
    width: 100%;
}

.gallery-image,
.gallery-video video {
    width: 100%;
    border-radius: 0.75rem;
    display: block;
    background: black;
}

.gallery-video video {
    max-height: 55vh;
}

.details-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.25rem 0;
}

.details-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.details-item:last-child {
    border-bottom: none;
}

.details-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.56);
}

.details-value {
    font-size: 0.95rem;
    line-height: 1.6;
    color: inherit;
    padding-left: 0.25rem;
    white-space: pre-line;
}

.video-modal-player {
    width: 100%;
    height: min(60vh, 480px);
    border-radius: 0.75rem;
    background: black;
}

.card-button:hover {
    transform: translateY(-1px);
    background: #0f1942;
}

.card-back-title {
    margin: 0;
    min-height: 0;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--secondary);
}

.card-back-text {
    margin: 0;
    color: #2c2c2c;
    line-height: 1.65;
    white-space: pre-wrap;
}

.card-text {
    white-space: pre-line;
}

@media (max-width: 777px) {
    .grid {
        grid-template-columns: repeat(2, minmax(174px, 1fr));
    }

    .card {
        max-width: 100%;
    }
}

@media (max-width: 639px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .card {
        max-width: 100%;
    }

    .card-front-content,
    .card-back-content {
        /*justify-content: center;
        align-items: center;
        text-align: center;*/
        display: flex;
        flex-direction: column;
        flex: 1;
        padding: 1rem;
    }

    .card-back-title {
        margin: 0;
    }

    .card-back-text {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .card-button {
        width:100%;
        padding: 0.75rem 1rem;
    }

    .card-button.card-button-video {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 73.9375rem) {
    .card {
        max-width: 300px;
    }
}
@media (min-width: 74rem) {
    .grid {
        grid-template-columns: repeat(4, 255px);
    }

    .card {
        max-width: 255px;
    }
}

.card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--radius);
    background: #fff;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-title {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.3;
    min-height: 5rem;
    font-weight: 700;
    text-align: center;
    color: var(--secondary);
    display: block;
}

.card-title.card-back-title,
.card-back-title {
    min-height: 0;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    padding-bottom: 0;
}

.card-title-tag {
    display: block;
    font-size: 0.8em;
    font-weight: 500;
    font-style: italic;
    color: rgba(26, 26, 26, 0.8);
    margin-bottom: 0.25rem;
}

.card-title-main {
    display: block;
}

.card-text {
    margin: 0;
    text-align: center;
    color: #2c2c2c;
}

footer {
    padding: 2rem 0;
    background: var(--primary);
    color: white;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.footer-title {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
}

.footer-letter-c {
    color: #00a7c2;
}

.footer-letter-o {
    color: #f25e33;
}

.footer-letter-d {
    color: #583e99;
}

.footer-letter-e {
    color: #f2ae01;
}

.footer-copy,
.footer-contact {
    margin: 0;
    font-size: 0.95rem;
}

.footer-contact {
    line-height: 1.5;
}

@media (max-width: 40rem) {
    .container {
        padding: 0 0.75rem;
    }
}

@media (min-width: 778px) and (max-width: 1183px) {

    .card-back-text {
        font-size: 0.9rem;
        line-height: 1.45;
    }
}

/* --------- CONTACT MODAL --------- */
.contact-modal {
    position: fixed;
    inset: 0;                     /* couvre tout l’écran */
    display: none;                /* cachée tant qu’on ne l’ouvre pas */
    align-items: center;
    justify-content: center;
    z-index: 2000;                /* au‑dessus du contenu (supérieur à .video-modal) */
}

.contact-modal.open {
    display: flex;                /* visible quand la classe .open est ajoutée */
}

.contact-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);   /* voile semi‑transparent */
}

/* Contenu de la modale (boîte blanche) */
.contact-modal-content {
    position: relative;
    background: #fff;
    color: #000;
    border-radius: var(--radius);
    max-width: 420px;
    width: 90%;
    padding: 1.5rem;
    box-shadow: 0 12px 30px rgba(0,0,0,.25);
}

/* Bouton de fermeture (croix) */
.contact-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.4rem;
    height: 2.4rem;
    border: none;
    background: rgba(0,0,0,0.07);
    color: #000;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
}
.contact-modal-close:hover {
    background: rgba(0,0,0,0.12);
}