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

/*Pour que meme si le contenu est trop court le footer reste en bas de la page*/
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.custom-header {
    background: #e4f3ff;
    padding: 35px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header figure a {
    display: flex;
    align-items: center;
    gap: 10px;
}

header figure img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 0.5px solid #ffffff;
    transition: transform 0.3s ease;
}

header nav ul {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    list-style: none;
}

header nav a {
    font-weight: 550;
    font-size: 20px;
    padding: 5px 10px;
    border-radius: 4px;
    color: #0B101A;
}

header a {
    text-decoration: none;
}

header a img {
    width: 25px;
    height: 25px;
}

.right {
    display: flex;
    gap: 25px;
    justify-content: space-around;
    align-items: center;
}

.btn1 {
    color: #000;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 4px 2px rgba(0, 0, 0, 0.2);
    padding: 8px 16px;
    transition: transform 0.2s ease;
}

.btn1:hover {
    transform: scale(1.03);
}

.cookie-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.cookie-content {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.cookie-buttons {
    margin-top: 20px;
}

.cookie-buttons button {
    padding: 10px 20px;
    margin: 0 10px;
    border-radius: 5px;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

.cookie-buttons button:first-child {
    background-color: #0f172a;
    color: white;
}

.cookie-buttons button:last-child {
    background-color: #ccc;
    color: #333;
}

.btn1 {
    color: #000;
    font-size: 1.1rem;
    font-weight: 600;
    /*border: 0.2px solid ;*/
    border-radius: 12px;
    box-shadow: 0 4px 2px rgba(0, 0, 0, 0.2);
    padding: 8px 16px;
    transition: transform 0.2s ease;
}

.btn1:hover {
    transform: scale(1.03);
}

main {
    max-width: 1300px;
    width: 100%;
    margin: 20px auto;
    padding: 30px;
    background-color: #f8fafc;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    flex: 1;
}

.hero {
    position: relative;
    background-image: url('../images/carte-radar.png');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    height: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    color: white;
    overflow: hidden;
}

.hero-content {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
}

.hero-content h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.hero-content a {
    background-color: #fff;
    color: #000;
    border: none;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.hero-content a:hover {
    background-color: #e2e2e2;
}

form {
    margin: 40px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    border-bottom: 4px solid #0f172a;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    transition: transform 0.3s ease;
    max-width: 1200px;
    width: 700px;
    gap: 10px;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    top: 25%;
    left: 10px;
}

.input-icon i.fa-lock {
    position: absolute;
    top: 25%;
    left: 10px;
}

.input-icon i#icon-eye, .input-icon i#icon-plane {
    position: absolute;
    top: 25%;
    left: auto;
    right: 10px;
}

form:hover {
    transform: scale(1.02);
}

.legend {
    font-size: 1.6em;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
    border-bottom: 2px solid #ccc;
    padding-bottom: 10px;
}

form label {
    display: block;
    font-weight: bold;
    color: #333;
    padding-top: 5px;
    margin: 10px 0;
}

form input,
form select,
form textarea {
    width: 100%;
    padding: 12px 30px 15px 35px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.name-container {
    display: flex;
    gap: 10px;
}

.name-container .name-item {
    flex: 1;
}

#contact_form input[name="prenom"],
#contact_form input[name="nom"] {
    width: 100%;
}

form input:focus,
form select:focus,
form textarea:focus {
    border-color: #0f172a;
    box-shadow: 0 0 5px rgba(15, 23, 42, 0.3);
    outline: none;
}

form input[type="submit"], button[type="submit"] {
    background-color: #0f172a;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

form input[type="submit"]:hover, button[type="submit"]:hover {
    background-color: #e4f3ff;
    color: #0f172a;
    transform: scale(1.05);
}

#gototop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: #0f172a;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    text-align: center;
    line-height: 40px;
    cursor: pointer;
    display: none;
    z-index: 9999;
}

#gototop:hover {
    background-color: #0056b3;
}

article {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    /*border-left: 4px solid #3498db;*/
    transition: all 0.3s ease;
}

article:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.08);
}

article h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

article p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.grille-cartes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
    justify-content: center;
}

.carte figure {
    text-align: center;
}

/*.carte p {*/
/*    display: inline-block;*/
/*}*/

/* Petit bloc avion + miniature */
.aircraft-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.aircraft-header img {
    width: 50px;
    height: auto;
    border-radius: 4px;
}

/* Image principale */
.aircraft-photo {
    max-width: 500px;
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-top: 10px;
    display: block;
}


footer {
    background: #e4f3ff;
    padding: 30px 0 0;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section {
    min-width: 250px;
    margin-bottom: 30px;
    padding: 0 15px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section a {
    text-decoration: none;
}

.footer-section ul {
    list-style: none;
    display: flex;
    /*flex-direction: column;*/
    gap: 10px;
}

.footer-section > ul {
    display: flex;
    flex-direction: column;
}

.footer-icon img {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
    filter: brightness(0.8);
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    transition: all 0.3s ease;
    display: block;
    padding: 5px 0;
    color: #000;
}

.footer-bottom {
    background: #0f172a;
    color: #e4f3ff;
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

h1, h3 {
    text-align: center;
    margin: 25px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
}

.danger {
    background-color: red;
    color: white;
}

section {
    margin: 10px;
    padding: 2rem;
    background-color: white;
    border-radius: 20px;
}

.aircraft-header {
    display: flex;
    justify-content: center;
}

.aircraft-body {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    width: 100%;
    padding: 2%;
    gap: 25px;
}

.aircraft-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

#aside-form {
    padding: 20px;
    margin: 40px auto;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-content: center;
    flex-wrap: wrap;
    background-color: white;
    width: 700px;
    height: auto;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media only screen and (max-width: 576px){
    main {
        width: 95%;
        margin: 5% 2% 5% 2%;
    }

    main > h1 {
        font-size: 24px !important;
        margin: 2%;
        text-align: start;
    }

    .hero-content a {
        padding: 0.5rem 1rem;
        border-radius: 8px;
        font-size: 0.4rem;
        display: inline-block;
        transition: background-color 0.3s ease;
    }


    .hero-content h2 {
        text-align: start;
    }

    main section h2, .hero h2 {
        font-size: 18px;
    }

    .footer-section h3 {
        font-size: 16px;
    }

    section {
        width: 100%;
        margin: 5% 0;
        justify-content: center;
    }

    .image figure img {
        width: 87.90%;
    }

    form {
        width: 100%;
    }

    main p, .hero p {
        font-size: 16px;
    }

    /*.res-link {*/
    /*    flex-direction: column;*/
    /*}*/

    .work {
        width: 260px;
        height: 260px;
    }

    form input,
    form select,
    form textarea,
    form label {
        font-size: 0.9rem;
    }

    main section figcaption {
        font-size: 15px;
    }

    aside {
        font-size: 0.6rem;
        padding: 0.8% 1%;
        margin: 3.5% auto;
    }

    .footer-bottom p {
        margin: 0 2%;
        font-size: 11px;
        text-align: center;
    }

    .g-recaptcha {
        display: inline-block;
        transform: scale(0.82);
        transform-origin: 0 0;
    }

    .aircraft-body {
        flex-direction: column;
    }

    #aside-form {
        width: 100%;
    }
}


/* ----------- GRID ----------- */
.grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}
/* ----------- CARD ----------- */
.card {
    display: flex;
    flex-direction: row;
    width: 100%;
    padding: 20px 40px;
    gap: 25px;
    cursor: pointer;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    align-items: center;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.card img {
    width: 100%;
    max-width: 150px;
    height: 100px;
    border-radius: 10px;
}
.card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.card-content h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #007bff;
    word-wrap: break-word;
}
.card-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 0px;
    row-gap: 8px;
    font-size: 14px;
}
.card-info-item {
    display: flex;
    gap: 20px;
    min-width: 0;
}
.card-info-label {
    font-weight: bold;
    color: black;
    font-size: 16px;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}
.card-info-value {
    color: #333;
    font-size: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 1200px) {
    .card-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 850px) {
    .card {
        flex-direction: column;
    }
    .card-content {
        width: 80%;
    }
    .card-info {
        grid-template-columns: repeat(3, 1fr);
    }
    .card-info-item {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 650px) {
    .card-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .card {
        padding: 15px;
    }
    .card-content h3 {
        font-size: 18px;
    }
    .card-info-label {
        font-size: 14px;
    }
    .card-info-value {
        font-size: 13px;
    }
}

/* ----------- OVERLAY ----------- */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}
.overlay.active {
    display: flex;
}
.card.expanded {
    flex-direction: column;
    max-width: 750px;
    padding: 30px;
    cursor: default;
}
.card.expanded:hover {
    transform: none;
}
.expanded img {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 0 auto 0 auto;
    border-radius: 14px;
    display: block;
}
.expanded .card-content {
    width: 80%;
}
.expanded .card-content h3 {
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
}
.expanded .card-info {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 20px;
    row-gap: 15px;
    font-size: 16px;
}
.expanded .card-info-item {
    gap: 15px;
}

/* Info de recherche (search) */
.search-info {
    background: #f0f7ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #2196F3;
}

.search-note {
    color: #666;
    font-size: 0.9em;
    margin-top: 8px;
}

.flights-list {
    display: grid;
    gap: 15px;
}

.flight-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s;
}

.flight-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.flight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.flight-header h4 {
    margin: 0;
    font-size: 1.3em;
    color: #2c3e50;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-active {
    background: #4CAF50;
    color: white;
}

.badge-scheduled {
    background: #2196F3;
    color: white;
}

.badge-landed {
    background: #9E9E9E;
    color: white;
}

.badge-cancelled {
    background: #f44336;
    color: white;
}

.flight-airline {
    margin-bottom: 12px;
    font-weight: 500;
    color: #555;
}

.code {
    color: #999;
    font-size: 0.9em;
    font-weight: normal;
}

.flight-route {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: start;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 10px 0;
}

.airport {
    text-align: center;
}

.airport-code {
    font-size: 1.5em;
    font-weight: bold;
    color: #2c3e50;
}

.airport-name {
    font-size: 0.85em;
    color: #666;
    margin: 4px 0 8px 0;
}

.arrow {
    font-size: 1.5em;
    color: #2196F3;
    align-self: center;
}

.time {
    font-size: 0.8em;
    margin: 3px 0;
    color: #666;
}

.time.actual {
    color: #4CAF50;
    font-weight: bold;
}

.time.estimated {
    color: #FF9800;
}

.tags {
    margin-top: 8px;
}

.tag {
    display: inline-block;
    background: #e3f2fd;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    margin: 2px;
}

.flight-aircraft {
    margin-top: 10px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 0.9em;
}

.aircraft-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.flight-live {
    margin-top: 10px;
    padding: 10px;
    background: #e8f5e9;
    border-radius: 6px;
    font-size: 0.9em;
}

.live-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.airport-results {
    margin-top: 20px;
}

.airport-section {
    margin: 25px 0;
}

.section-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.no-results {
    text-align: center;
    padding: 30px;
    color: #999;
    font-style: italic;
}

@media (max-width: 768px) {
    .card.expanded {
        width: 95%;
        padding: 20px;
    }
    .expanded .card-content {
        width: 100%;
    }
    .expanded .card-content h3 {
        font-size: 22px;
    }
	
	.flight-route {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .arrow {
        transform: rotate(90deg);
        margin: 5px 0;
    }
    
    .airport-code {
        font-size: 1.2em;
    }
    
    .aircraft-grid,
    .live-grid {
        flex-direction: column;
        gap: 8px;
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.close-btn:hover {
    color: #333;
    background: #f0f0f0;
}